import Alert from './Alert';
import Vue from 'vue';

const AlertConstructor = Vue.extend(Alert);

const serve = (title, message) => {

    let alertInstance = new AlertConstructor();

    alertInstance.$mount(document.createElement('div'));

    document.body.appendChild(alertInstance.$el);

    alertInstance.title = title;
    alertInstance.message = message;
    alertInstance.visible = true;

    

}

export default serve;